package com.sinsoft.monitorDemo.controller;


import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sinosoft.framework.core.common.utils.ajax.ResponseData;
import com.sinsoft.monitorDemo.dao.OsOtherInfoDao;
import com.sinsoft.monitorDemo.entity.OsOtherInfo;

@Controller
@RequestMapping("/osOtherInfo")
public class OsOtherInfoController {
	
	/**
	 * 得到最新的系统资源其他信息信息
	 * @return
	 */
	@RequestMapping(value = "/getNewOsOtherinfo", method = RequestMethod.POST)
	@ResponseBody
	public ResponseData getNewOsOtherinfo(HttpServletRequest request){
		OsOtherInfoDao dao = new OsOtherInfoDao();
		String ip = request.getParameter("ip");
		OsOtherInfo osOtherInfo = dao.getNewCpuInfo(ip);
		ResponseData responseData = new ResponseData(true, osOtherInfo);
		return responseData;	
	}
}
